package com.koron.device.mapper;

import com.koron.device.bean.ClassifyBean;
import com.koron.device.bean.EquipmentApply;
import com.koron.device.bean.EquipmentBackup;
import com.koron.device.bean.EquipmentBackupQuery;
import com.koron.device.bean.dto.ClassifyDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.Collection;
import java.util.List;

@Mapper
@Component
public interface EquipmentBackupMapper {

    List<EquipmentBackup> getById(@Param("id") String id);

    EquipmentBackup getDetailById(@Param("id") String id);

    int addbind(@Param("id") String id,@Param("list")List<EquipmentApply> backbind);

    int addnobind(EquipmentBackup querry);

    int update(@Param("query") EquipmentBackup query,@Param("status") String status);

    int delbind(@Param("id") String id);

    int deleteByIdIn(@Param("idCollection")Collection<String> idCollection);

    int commitNew(EquipmentBackup query);

    int delById(@Param("id") String id);

    int delByLogic(String id);

    List<EquipmentBackup> serch(@Param("query") EquipmentBackupQuery query,@Param("count") int count);

    int commitOld(EquipmentBackup query);

    Integer getByCode(String code);

    int insertClassify(ClassifyBean classifyBean);

    List<ClassifyBean> getTree(ClassifyBean query);

    int updateClassify(ClassifyBean classifyBean);

    int deleteClassify(ClassifyBean classifyBean);

    ClassifyBean getClassifyById(@Param("id") String id);

    void setBind(@Param("classifyId") String classifyId,@Param("isBind") String isBind);

    int addlist(List<EquipmentBackup> query);

    List<String> checkFile(List<EquipmentBackup> query);

    ClassifyBean serchClassifyById(@Param("classifyid") String classifyid);

    void resetBind();

    List<ClassifyBean> getTreeList();

    int updateStatusById(@Param("updatedStatus")String updatedStatus,@Param("id")String id);

    List<ClassifyDto> queryAll();

    int batchInsert(@Param("list") List<EquipmentBackup> list);

    List<EquipmentBackup> queryByEqIdIn(@Param("eqIds") List<String> eqIds, @Param("backup") EquipmentBackupQuery backup);

}
